#ifndef STUDENTINFOWIDGET_H
#define STUDENTINFOWIDGET_H

#include <QWidget>
#include <QTableWidgetItem>

class QGroupBox;
namespace Ui {
class StudentInfoWidget;
}

class StudentInfoWidget : public QWidget
{
    Q_OBJECT

public:
    explicit StudentInfoWidget(QWidget *parent = nullptr);
    ~StudentInfoWidget();
private slots:
    void on_btnAdd_clicked();

    void on_btnDeleteItem_clicked();

    void on_btnDeleteLine_clicked();

    void handleItemChanged(QTableWidgetItem *item);

private:
    void refreshTable();

    void handleDialogAccepted(QGroupBox *formGroup,QGroupBox* photoGroup);
    QGroupBox *createFormGroup();
    QGroupBox *createPhotoGroup();
    QByteArray photoData;

private:
    Ui::StudentInfoWidget *ui;
};

#endif // STUDENTINFOWIDGET_H
